package ar.com.personalTravellers.daos.impl;

import java.util.Collection;

import ar.com.personalTravellers.beans.Continent;
import ar.com.personalTravellers.beans.Country;
import ar.com.personalTravellers.daos.CountryDAO;

import com.angel.architecture.persistence.ids.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;

/**
 *
 * @author William
 */
public class CountrySpringHibernateDAO extends GenericSpringHibernateDAO<Country, ObjectId> implements CountryDAO {

    public CountrySpringHibernateDAO() {
        super(Country.class, ObjectId.class);
    }

    public Country findUniqueByName(String name) {
        return super.findUnique("name", name);
    }

    public Country findUniqueByLocale(String locale) {
        return super.findUnique("locale", locale);
    }

    public Collection<Country> findAllByContinent(Continent continent) {
        return super.findAll("continent", continent);
    }
}